package com.xiaomi.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//-- 预警记录表
//CREATE TABLE `alert_record` (
//                                `alert_id` BIGINT AUTO_INCREMENT COMMENT '预警ID（主键）',
//                                `vehicle_frameNumber` INT NOT NULL COMMENT '车架编号',
//                                `rule_code` TINYINT NOT NULL COMMENT '关联规则编号',-- 1:电压差报警，2:电流差报警
//                                `alert_level` TINYINT NOT NULL COMMENT '报警等级（0-4）',
//                                `alert_time` DATETIME NOT NULL COMMENT '触发时间',
//                                `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
//                                PRIMARY KEY (`alert_id`),
//                                KEY `idx_vid_alert_time` (`vehicle_frameNumber`, `alert_time`),
//                                KEY `fk_rule_id` (`rule_code`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='预警记录表';
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AlertRecord {
    private Integer alertId;//预警id
    private Long vehicleFrameNumber;//车架编号
    private Integer ruleCode;//关联规则编号
    private Integer alertLevel;//报警等级
    private LocalDateTime alertTime;//触发时间
    private LocalDateTime createTime;//创建时间
}
